API Endpoints
Response
- 200: Success
- 403: Forbidden
- 400: Bad Request
Auth
auth_keycloak.js
Forget Password
- Route:
/fogetPasswordKeycloak
- Method: POST
- Body:
realm, email
- Related API:
- access:
POST /user/resetPassword
- Return Format:
- Success: 200
res.json({ success: true })
- Failure: 500
{ success: false, error: 'Invalid access' }
calllog.js
Create Calllog
- Route:
/ua/calllog
- Method: POST
- Body:
user, phone, start, end, duration, idContact
- Description: Creates a new call log entry with the specified details.
- Related API:
- access:
POST /callcenter/${idCallcenter}/calllog
- access:
GET /${versionApi}/callcenter/${user.idCallcenter}/contacts/search
- Return Format:
- Success: 200
res.json(response.data)
- Failure: 400
{ success: false, error: 'Invalid input' }
integration.js
Create Integration
- Route:
/ua/integration/:template_name/endpoint/:endpoint_name
- Method: POST
- Body:
user, phone, start, end, duration, idContact
- Related API:
- integration:
POST /api/integrator/${template_name}/endpoint/${endpoint_name}
- Return Format:
- Success: 200
res.status(response.status).json(response.data)
- Failure: 400
{ success: false, error: { message: error.message } }
nexmo.js
Get Inbound SMS from Nexmo
- Route:
/inbound-sms
- Method: GET
- Query Parameters:
text, msisdn, to, api-key, idCallcenter
- Related API:
- Access:
GET /nexmos
- Access:
GET /callcenter/${idCallcenter}/phone
- Access:
POST /callcenter/${idCallcenter}/contact
- Access:
GET /callcenter/${idCallcenter}/contact/${idContact}/activities
- Access:
GET /user/search
- Access:
POST /callcenter/${idCallcenter}/contact/${idContact}/activity
- Return Format:
- Success: 200
res.json(response.data)
- Failure: 400
{ success: false, error: { message: error.message } }
activity.js
- Route:
/contact/:contact_id/activities
- Method: GET
- Params:
contact_id
- Query Parameters:
page, limit, type
- Related API:
- Access:
GET /callcenter/${user.idCallcenter}/contact/${contact_id}
- Access:
GET /callcenter/${user.idCallcenter}/contact/${contact_id}/activities
- Access:
GET /callcenter/${user.idCallcenter}/agents/all
- Return Format:
- Success: 200
res.json({ success: true, result: list, hasMore })
- Failure: 400
{ success: true, result: [], hasMore: false }
- Route:
/contact/:contact_id/activity
- Method: POST
- Params:
contact_id
- Body:
req.body
- Related API:
- Access:
POST /callcenter/${user.idCallcenter}/contact/${contact_id}/activity
- Access:
GET /callcenter/${user.idCallcenter}/agent/${body.body.remindedAgent}
- Return Format:
- Success: 200
res.json(response.data)
- Failure: 400
{ success: true, result: null }
Get All Activities
- Route:
/activities
- Method: GET
- Related API:
- Access:
GET /callcenter/${user.idCallcenter}/activities
- Access:
GET /callcenter/${user.idCallcenter}/agents/all
- Return Format:
- Success: 200
{ success: true, result: list, hasMore }
- Failure: 400
{ success: true, result: null }
Get Activity Details
- Route:
/contact/:contact_id/activity/:activity_id
- Method: GET
- Params:
contact_id, activity_id
- Related API:
- Access:
GET /callcenter/${user.idCallcenter}/contact/${contact_id}/activity/${activity_id}
- Return Format:
- Success: 200
res.json(resp.data)
- Failure: 400
{ success: true, result: null }
Update Activity
- Route:
/contact/:contact_id/activity/:activity_id
- Method: PUT
- Params:
contact_id, activity_id
- Related API:
- Access:
PUT /callcenter/${user.idCallcenter}/contact/${contact_id}/activity/${activity_id}
- Access:
GET /callcenter/${user.idCallcenter}/contact/${contact_id}/activity/${activity_id}
- Return Format:
- Success: 200
res.json(resp.data)
- Failure: 400
{ success: true, result: null }
Delete Activity
- Route:
/contact/:contact_id/activity/:activity_id
- Method: DELETE
- Params:
contact_id, activity_id
- Related API:
- Access:
DELETE /callcenter/${user.idCallcenter}/contact/${contact_id}/activity/${activity_id}
- Return Format:
- Success: 200
res.json(response.data)
- Failure: 400
{ success: true }
- Route:
/activity/:id/tags
- Method: POST
- Params:
id
- Body:
req.body
- Related API:
- Access:
POST /callcenter/${user.idCallcenter}/activity/${id}/tags
- Return Format:
- Success: 200
res.json(response.data)
- Failure: 400
{ success: true, result: null }
- Route:
/activity/:id/tags
- Method: DELETE
- Params:
id
- Body:
req.body
- Related API:
- Access:
DELETE /callcenter/${user.idCallcenter}/activity/${id}/tags
- Return Format:
- Success: 200
res.json(resp.data)
- Failure: 400
{ success: true, result: null }
agent.js
All Agents
- Route:
/agents/all
- Method: GET
- Related API:
- Access:
GET ${versionApi}/callcenter/${idCallcenter}/agents/all
- Return Format:
- Success: 200
res.json(response.data)
- Failure: 400
{ success: false, error: 'Invalid input' }
Update Agent Status
- Route:
/agent/status
- Method: PUT
- Body:
req.body
- Related API:
- Return Format:
- Success: 200
res.json({ success: true })
- Failure: 400
{ success: false, error: 'Invalid input' }
calllog.js
Create Calllog